Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
body { margin: 0; }
// Options const LINES = 8; const STROKE = 8; const XSTEP = 20; const WAVINESS = 0.005; // Smaller is smoother waves const WAVE_HEIGHT = 1.25; const COLORS = ["blue", "white", "gold", "red"]; // navy, gold function setup() { createCanvas(windowWidth, windowHeight); } let seed = 0; let loopSeed = 0; function draw() { background(0); noStroke(); loopSeed = seed; for (i = 0; i < LINES; i++) { let color = fill(COLORS[i % COLORS.length]); loopSeed += 1; for (let x = 0; x < windowWidth; x = x + XSTEP) { loopSeed = loopSeed + WAVINESS; let y = noise(loopSeed) * (windowHeight * WAVE_HEIGHT) - windowHeight * ((WAVE_HEIGHT - 1) / 2); ellipse(x + XSTEP / 2, y, STROKE); } } seed = seed + WAVINESS; }